package com.szd.qiongyou20.home.search.presenter;

import com.szd.qiongyou20.home.search.bean.MddBean;
import com.szd.qiongyou20.home.search.modle.LoadSearchData;
import com.szd.qiongyou20.home.search.modle.SearchData;
import com.szd.qiongyou20.home.search.modle.SearchMddListener;
import com.szd.qiongyou20.home.search.view.MddDataToView;

/**
 * Created by SZD on 2016/12/26.
 */

public class MddPre {

    private SearchData mSearchData;
    private MddDataToView mMddDataToView;
//    private String keyword;

    public MddPre(MddDataToView mddDataToView, String keyword) {
        mMddDataToView = mddDataToView;
        mSearchData = new LoadSearchData(keyword);
    }

    public void loadDataToView(){
        mSearchData.searchMddData(new SearchMddListener() {
            @Override
            public void searchSuccess(MddBean mddBean) {
                mMddDataToView.DataToView(mddBean);
            }

            @Override
            public void searchFaile(String string) {

            }
        });
    }
}
